﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VIKI.BLL;
using VIKI.LINQ;

namespace VIKI.Web.Home.UserCenter
{
    public partial class UserCenter : System.Web.UI.Page
    {
        private readonly UserBLL userBll = new UserBLL();
        protected User user = null;
        protected string id = "121321312";

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserId"] == null)
            {
                string url = Request.UrlReferrer != null ? Request.UrlReferrer.ToString() : "~/Home/Index/Index.aspx";
                Response.Redirect(url);
            }
            else
            {
                Guid userId = (Guid)Session["UserId"];
                user = userBll.FindUserById(userId);
            }
        }
    }
}